import Vue from 'vue'
import Router from 'vue-router'
import Login from './views/Longin.vue'
import Home from './views/Home.vue'
import showbutton from './views/showbutton.vue'

Vue.use(Router)

export default new Router({
    routes: [{
            path: '/login',
            name: 'login',
            component: Login
        },
        {
            path: '/',
            name: 'home',
            component: Home,
            redirect: { name: 'welcome' },
            children: [{
                    path: 'show',
                    name: 'show',
                    component: () =>
                        import ( /* webpackChunkName: "show" */ './views/showbutton.vue')
                },
                {
                    path: 'welcome',
                    name: 'welcome',
                    component: () =>
                        import ( /* webpackChunkName: "welcome" */ './views/welcome.vue')
                },
                {
                    path: 'users',
                    name: 'users',
                    component: () =>
                        import ( /* webpackChunkName: "users" */ './views/users.vue')
                },
                {
                    path: 'rights',
                    name: 'rights',
                    component: () =>
                        import ( /* webpackChunkName: "rights" */ './views/auth/rights.vue')
                },
                {
                    path: 'roles',
                    name: 'roles',
                    component: () =>
                        import ( /* webpackChunkName: "roles" */ './views/auth/roles.vue')
                },
                {
                    path: 'categories',
                    name: 'categories',
                    component: () =>
                        import ( /* webpackChunkName: "categories" */ './views/goods/productitem.vue')
                },
                {
                    path: 'goods',
                    name: 'goods',
                    component: () =>
                        import ( /* webpackChunkName: "goods" */ './views/goods/goodlist.vue')
                },
                {
                    path: 'addPro',
                    name: 'addPro',
                    component: () =>
                        import ( /* webpackChunkName: "goods" */ './views/goods/addPro.vue')
                },
                {
                    path: 'orders',
                    name: 'orders',
                    component: () =>
                        import ( /* webpackChunkName: "orders" */ './views/orders.vue')
                }
            ]
        }
    ]
})